/**
 * 
 */
package com.bitBusy.manageyourriches.alarmSystem;

import java.util.List;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import com.bitBusy.manageyourriches.database.contactClasses.PaymentReminder;
import com.bitBusy.manageyourriches.database.managers.DatabaseInteractor;

/**
 * @author SumaHarsha
 *
 */
public class PhoneBootReceiverService extends Service{
	
	private DatabaseInteractor myDBInteractor;

	/* (non-Javadoc)
	 * @see android.app.Service#onBind(android.content.Intent)
	 */
	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}
	
	 @Override
	    public void onCreate() {
		 myDBInteractor = new DatabaseInteractor(this);
		 List<PaymentReminder> reminders = myDBInteractor.getAllReminders();
		 for (PaymentReminder reminder : reminders)
		 {
			 AlarmManagement.setAlarm(reminder);
		 }
		 
	 }

}
